﻿CREATE TABLE [dbo].[SetariLocale] (
    [xUser]      VARCHAR (50)     CONSTRAINT [DF_SetariLocale_xUser] DEFAULT (suser_sname()) NOT NULL,
    [xHost]      VARCHAR (50)     CONSTRAINT [DF_SetariLocale_xHost] DEFAULT (host_name()) NOT NULL,
    [CodSetare]  VARCHAR (10)     NOT NULL,
    [CodUnitate] SMALLINT         CONSTRAINT [DF_SetariLocale_CodUnitate] DEFAULT ((0)) NOT NULL,
    [Valoare]    VARCHAR (250)    NOT NULL,
    [UserId]     UNIQUEIDENTIFIER NULL,
    CONSTRAINT [PK_SetariLocale] PRIMARY KEY CLUSTERED ([xUser] ASC, [xHost] ASC, [CodSetare] ASC, [CodUnitate] ASC),
    CONSTRAINT [FK_SetariLocale_Unitati] FOREIGN KEY ([CodUnitate]) REFERENCES [dbo].[Unitati] ([CodUnitate])
);

